import 'package:atcflutter/user/bean/user_entity.dart';

userEntityFromJson(UserEntity data, Map<String, dynamic> json) {
	if (json['isfirstopen'] != null) {
		data.isfirstopen = json['isfirstopen']?.toInt();
	}
	if (json['fromtype'] != null) {
		data.fromtype = json['fromtype']?.toInt();
	}
	if (json['dealerid'] != null) {
		data.dealerid = json['dealerid']?.toString();
	}
	if (json['memberid'] != null) {
		data.memberid = json['memberid']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['mobile'] != null) {
		data.mobile = json['mobile']?.toString();
	}
	if (json['nickname'] != null) {
		data.nickname = json['nickname']?.toString();
	}
	if (json['rolenames'] != null) {
		data.rolenames = json['rolenames']?.toString();
	}
	if (json['roleids'] != null) {
		data.roleids = json['roleids']?.toString();
	}
	if (json['currenttime'] != null) {
		data.currenttime = json['currenttime']?.toString();
	}
	if (json['deptid'] != null) {
		data.deptid = json['deptid']?.toString();
	}
	if (json['deptname'] != null) {
		data.deptname = json['deptname']?.toString();
	}
	if (json['czydealerid'] != null) {
		data.czydealerid = json['czydealerid']?.toString();
	}
	if (json['userkey'] != null) {
		data.userkey = json['userkey']?.toString();
	}
	if (json['pw'] != null) {
		data.pw = json['pw']?.toString();
	}
	if (json['isadmin'] != null) {
		data.isadmin = json['isadmin']?.toInt();
	}
	if (json['carwarn'] != null) {
		data.carwarn = json['carwarn']?.toInt();
	}
	if (json['crmwarn'] != null) {
		data.crmwarn = json['crmwarn']?.toInt();
	}
	if (json['islogin'] != null) {
		data.islogin = json['islogin']?.toInt();
	}
	return data;
}

Map<String, dynamic> userEntityToJson(UserEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['isfirstopen'] = entity.isfirstopen;
	data['fromtype'] = entity.fromtype;
	data['dealerid'] = entity.dealerid;
	data['memberid'] = entity.memberid;
	data['name'] = entity.name;
	data['mobile'] = entity.mobile;
	data['nickname'] = entity.nickname;
	data['rolenames'] = entity.rolenames;
	data['roleids'] = entity.roleids;
	data['currenttime'] = entity.currenttime;
	data['deptid'] = entity.deptid;
	data['deptname'] = entity.deptname;
	data['czydealerid'] = entity.czydealerid;
	data['userkey'] = entity.userkey;
	data['pw'] = entity.pw;
	data['isadmin'] = entity.isadmin;
	data['carwarn'] = entity.carwarn;
	data['crmwarn'] = entity.crmwarn;
	data['islogin'] = entity.islogin;
	return data;
}